package openbang.account.service.entity;


import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import openbang.account.service.vo.BusinessEnum;
import openbang.account.service.vo.VerifyStatusEnum;

import com.google.gwt.user.client.rpc.IsSerializable;

import java.util.Date;


/**
 * 专门记录校验码处理的实体    按业务种类区分
 * 1、注册的校验码
 * 2、找回密码的校验码
 * 
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class VerifyRecord implements IsSerializable {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;

	@Persistent
	private String email="";

	@Persistent
	private Integer busiType =BusinessEnum.REGISTER.getCode();

	@Persistent
	private Integer status=VerifyStatusEnum.PENDING.getCode();

	/**
	 * 随机校验码  64个字符以内
	 */
	@Persistent
	private String verifyCode="";
	
	/**
	 * 申请日期
	 */
	@Persistent
	private Date applyTime= new Date();

	/**
	 * 确认日期(处理完毕)
	 */
	@Persistent
	private Date confirmTime= new Date();

	@Persistent
	private Date updTime = new Date();

    public VerifyRecord() {
    }

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getVerifyCode() {
		return verifyCode;
	}

	public void setVerifyCode(String verifyCode) {
		this.verifyCode = verifyCode;
	}

	public Date getApplyTime() {
		return applyTime;
	}

	public void setApplyTime(Date applyTime) {
		this.applyTime = applyTime;
	}

	public Date getConfirmTime() {
		return confirmTime;
	}

	public void setConfirmTime(Date confirmTime) {
		this.confirmTime = confirmTime;
	}

	public Date getUpdTime() {
		return updTime;
	}

	public void setUpdTime(Date updTime) {
		this.updTime = updTime;
	}

	public Integer getBusiType() {
		return busiType;
	}

	public void setBusiType(Integer busiType) {
		this.busiType = busiType;
	}

    
}